<div class="trans-log">
<div class="trans-log-atas">
	<div class="trans-log-atas-title">List Transaction</div>
	<div class="trans-log-page"><?php
	echo ! empty($pagination) ? '' . $pagination . '' : '';
	?>
	</div>
</div>
<div class="trans-log-tengah">
	<div class="trans-log-tengah-box">
<?php
if(isset($_SESSION['sys_admin']) and isset($_SESSION['name'])) {


//echo ! empty($table) ? $table : '';
?>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable"   width="760">
	<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th><th><h3>Name</h3></th><th><h3>Notes</h3></th><th><h3>Date Time</h3></th><th><h3>IP</h3></th>
    </tr>
	</thead>
<tbody>
<?php
$w1 ="#bee1ff";
$w2 ="#90ccff";
$warna = $w1;
$i=1;
$no=0;
foreach($log->result() as $log) {
	if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
$no++;
?>
<tr bgcolor="<?php echo $warna;?>">
	<td><?php echo ++$i;?></td>
    <td><?php echo $log->name;?></td>
    <td><?php echo $log->notes;?></td>
    <td><?php echo $log->datetime;?></td>
    <td><?php echo $log->ip;?></td>
	</tr>
<?php } ?>
</tbody>

</table>
<?php
} else if(isset($_SESSION['admin']) and isset($_SESSION['name'])){
	echo ! empty($h2_title) ? '<h2>' . $h2_title . '</h2>': '';
	//echo ! empty($table) ? $table : '';
?>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable"   width="760">
	<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th><th><h3>Name</h3></th><th><h3>Notes</h3></th><th><h3>Date Time</h3></th><th><h3>IP</h3></th>
    </tr>
	</thead>
<tbody>
<?php
$w1 ="#bee1ff";
$w2 ="#90ccff";
$warna = $w1;
$i=1;
$no=0;
foreach($log->result() as $log) {
	if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
$no++;
?>
<tr bgcolor="<?php echo $warna;?>">
	<td><?php echo ++$i;?></td>
    <td><?php echo $log->name;?></td>
    <td><?php echo $log->notes;?></td>
    <td><?php echo $log->datetime;?></td>
    <td><?php echo $log->ip;?></td>
	</tr>
<?php } ?>
</tbody>

</table>
<?php 
} else if(isset($_SESSION['intern_audit']) and isset($_SESSION['name'])){
	echo ! empty($h2_title) ? '<h2>' . $h2_title . '</h2>': '';
	//echo ! empty($table) ? $table : '';
?>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable"   width="760">
	<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th><th><h3>Name</h3></th><th><h3>Notes</h3></th><th><h3>Date Time</h3></th><th><h3>IP</h3></th>
    </tr>
	</thead>
<tbody>
<?php
$w1 ="#bee1ff";
$w2 ="#90ccff";
$warna = $w1;
$i=1;
$no=0;
foreach($log->result() as $log) {
	if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
$no++;
?>
<tr bgcolor="<?php echo $warna;?>">
	<td><?php echo ++$i;?></td>
    <td><?php echo $log->name;?></td>
    <td><?php echo $log->notes;?></td>
    <td><?php echo $log->datetime;?></td>
    <td><?php echo $log->ip;?></td>
	</tr>
<?php } ?>
</tbody>

</table>
<?php 
} else if(isset($_SESSION['second_consult']) and isset($_SESSION['name'])){
	echo ! empty($h2_title) ? '<h2>' . $h2_title . '</h2>': '';
	//echo ! empty($table) ? $table : '';
?>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable"   width="760">
	<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th><th><h3>Name</h3></th><th><h3>Notes</h3></th><th><h3>Date Time</h3></th><th><h3>IP</h3></th>
    </tr>
	</thead>
<tbody>
<?php
$w1 ="#bee1ff";
$w2 ="#90ccff";
$warna = $w1;
$i=1;
$no=0;
foreach($log->result() as $log) {
	if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
$no++;
?>
<tr bgcolor="<?php echo $warna;?>">
	<td><?php echo ++$i;?></td>
    <td><?php echo $log->name;?></td>
    <td><?php echo $log->notes;?></td>
    <td><?php echo $log->datetime;?></td>
    <td><?php echo $log->ip;?></td>
	</tr>
<?php } ?>
</tbody>

</table>
<?php
} else if(isset($_SESSION['dept_pic']) and isset($_SESSION['name'])){
	echo ! empty($h2_title) ? '<h2>' . $h2_title . '</h2>': '';
	echo ! empty($table) ? $table : '';
?>
<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable"   width="760">
	<thead>
	<tr>
		<th class="nosort"><h3>No</h3></th><th><h3>Name</h3></th><th><h3>Notes</h3></th><th><h3>Date Time</h3></th><th><h3>IP</h3></th>
    </tr>
	</thead>
<tbody>
<?php
$w1 ="#bee1ff";
$w2 ="#90ccff";
$warna = $w1;
$i=1;
$no=0;
foreach($log->result() as $log) {
	if($warna==$w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
$no++;
?>
<tr bgcolor="<?php echo $warna;?>">
	<td><?php echo ++$i;?></td>
    <td><?php echo $log->name;?></td>
    <td><?php echo $log->notes;?></td>
    <td><?php echo $log->datetime;?></td>
    <td><?php echo $log->ip;?></td>
	</tr>
<?php } ?>
</tbody>

</table>
<?php

}else {
	echo "salah coy";
 } ?>
 	</div>
<script type="text/javascript" src="<?php echo base_url();?>js/sorter.js"></script>
<script type="text/javascript">
	var sorter = new TINY.table.sorter("sorter");
		sorter.head="heads";
		sorter.asc = "asc";
		sorter.desc = "desc";
		sorter.even = "evenrow";
		sorter.odd = "oddrow";
		sorter.evensel ="evenselected";
		sorter.oddsel ="oddselected";
		sorter.paginate= true;
		sorter.currentid ="currentpage";
		sorter.limited ="pagelimit";
		sorter.init("table",1);
</script>
</div>
<div class="trans-log-bawah">
	<div class="trans-log-page2"><?php
	echo ! empty($pagination) ? '' . $pagination . '' : '';
	?></div>
</div>
</div>
